import type { TripData } from '@/types/api'

interface FetchIntercityNotInvoicedOrderListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    total: number
    per_page: string
    current_page: number
    last_page: number
    data: TripData[]
  }
}

interface FetchIntercityNotInvoicedOrderListAPIParams {
  page: string
  limit: string
}

export function fetchIntercityNotInvoicedOrderListAPI(params: FetchIntercityNotInvoicedOrderListAPIParams, token: string) {
  return httpInstance.get<FetchIntercityNotInvoicedOrderListAPIResData, FetchIntercityNotInvoicedOrderListAPIParams>(
    '/api/intercity/invoiceorderlist',
    { params, headers: { token } },
  )
}
